﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using XbdSoft.Client;
using XbdSoft.Contract;

namespace XbdSoft
{
    public partial class XbdInfoForm : DockContent
    {
        #region Ctor
        public XbdInfoForm()
        {
            InitializeComponent();

            CloseButton = false;
            HideOnClose = true; 
        }
        #endregion


        #region Page Load


        private void XbdInfoForm_Load(object sender, EventArgs e)
        {
            var url = "http://www.xbd61.com/";
            using (var service = new ServiceObject<IDownloadService>(Util.DownloadServiceAddress))
            {
                url = service.Object.GetDownloadInfoUrl();
            }
            InfoWebBrowser.Navigate(url);
        }

        #endregion

        #region Reload

        public void Reload(string url)
        {
            InfoWebBrowser.Navigate(url);
        }

        #endregion
    }
}
